package main

import (
	cliflag "k8s.io/component-base/cli/flag"
	"k8s.io/klog/v2"
	"runtime"
)

func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	/**
	配置klog，k8s有封装好的方法，可以直接初始化，日志等级默认打印到4级
	FLAG: --add-dir-header="false"
	FLAG: --alsologtostderr="false"
	FLAG: --log-backtrace-at=":0"
	FLAG: --log-dir=""
	FLAG: --log-file=""
	FLAG: --log-file-max-size="1800"
	FLAG: --logtostderr="true"
	FLAG: --one-output="false"
	FLAG: --skip-headers="false"
	FLAG: --skip-log-headers="false"
	FLAG: --stderrthreshold="2"
	FLAG: --v="4"
	FLAG: --vmodule=""
	*/
	klog.InitFlags(nil)
	cliflag.InitFlags()

	klog.V(1).Infof("loadAdmissionConf:%v", 1111)
	klog.V(2).Infof("loadAdmissionConf:%v", 2222)
	klog.V(3).Infof("loadAdmissionConf:%v", 3333)
	klog.V(4).Infof("loadAdmissionConf:%v", 4444)
	klog.V(5).Infof("loadAdmissionConf:%v", 5555)
	klog.V(6).Infof("loadAdmissionConf:%v", 6666)
	klog.V(7).Infof("loadAdmissionConf:%v", 7777)
	klog.V(8).Infof("loadAdmissionConf:%v", 8888)
	klog.V(9).Infof("loadAdmissionConf:%v", 9999)
	klog.V(10).Infof("loadAdmissionConf:%v", 1010)
	defer klog.Flush()
}
